<?php
include('../../include/functions.inc.php');
include('../../include/inputbuilder.inc.php');
include('../../include/maintenance.inc.php');

$maintenance = unserialize($_SESSION['mCourse']);
$list = $db->query_select("cllg_entity", NULL);
?>

<form id="<?php echo $maintenance->formName; ?>" name="<?php echo $maintenance->formName; ?>" method="POST" action="<?php echo $maintenance->saveNewUrlPage; ?>">
    <table class=""  width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <th scope="col"><legend>DATOS CURSO</legend></th>
            <th>
                <legend><div style="margin-left: 30%;margin-top: 1.4%" class="btn-group">
                    <input type="button" name="cmdOk" id="cmdOk" value="Guardar" class="btn btn-info" onClick="javascript:formOkBt($(this.form),updateAction);jQuery('#cmAddcontainer').show();" />      
                    <input type="button" name="cmdCancel" id="cmdCancel" value="Cancelar" class="btn btn-info" onClick="loadTable();jQuery('#cmAddcontainer').show();" />      
                </div></legend>    
            </th>
        </tr>
        <tr>
            <td colspan="2"><br/><table width="100%" border="0" cellspacing="0" cellpadding="0">

                    <tr>
                        <td width="20%">CODIGO </td>
                        <td width="80%"><input name="CODE" type="text" id="CODE" />          </td>
                    </tr>
                    <tr>
                        <td>NOMBRE</td>
                        <td><input name="NAME" type="text" id="NAME" size="48" />          </td>
                    </tr>
                    <tr>
                        <td valign="top">DESCRIPCION</td>
                        <td><textarea name="LONG_DESCRIPTION" id="LONG_DESCRIPTION" cols="45" rows="3"></textarea></td>
                    </tr>
                    <tr>
                        <td>DURACION (MESES)</td>
                        <td><input name="DURATION_MONTHS" type="text" id="DURATION_MONTHS" />          </td>
                    </tr>

                    <tr>
                        <td>ENTIDAD</td>
                        <td><select name="FK_ENTITY" id="FK_ENTITY">
                                <?php foreach ($list as $it) { ?>
                                    <option value="<?php echo $it["ID"]; ?>"><?php echo $it["NAME"]; ?> </option>
                                <?php } ?>
                            </select>
                            <input name="CREATED" type="hidden" id="CREATED" value="<?php echo date(DATE_PATTERN); ?> " />
                            <input name="CREATED_BY" type="hidden" id="CREATED_BY" value="<?php echo $user->name; ?>" /></td>
                    </tr>



                </table></td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;</td>
        </tr>
    </table>
</form>  


